package com.hejie.service.notification.service;

import com.hejie.common.model.BaseResponse;
import com.hejie.service.notification.dto.NotificationDTO;
import com.hejie.service.notification.dto.NotificationRequest;
import com.hejie.service.notification.entity.Notification;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface NotificationService {

    /**
     * 创建通知
     */
    BaseResponse<NotificationDTO> createNotification(NotificationRequest notificationRequest);

    /**
     * 获取用户通知列表
     */
    BaseResponse<Page<NotificationDTO>> getUserNotifications(Long userId, Pageable pageable);

    /**
     * 获取未读通知数量
     */
    BaseResponse<Long> getUnreadCount(Long userId);

    /**
     * 标记单个通知为已读
     */
    BaseResponse<Void> markAsRead(Long notificationId, Long userId);

    /**
     * 标记所有通知为已读
     */
    BaseResponse<Void> markAllAsRead(Long userId);

    /**
     * 批量删除通知
     */
    BaseResponse<Void> deleteNotifications(List<Long> notificationIds, Long userId);

    /**
     * 删除所有通知
     */
    BaseResponse<Void> deleteAllNotifications(Long userId);

    /**
     * 发送邮件通知
     */
    void sendEmailNotification(NotificationDTO notificationDTO, String email);

    /**
     * 发送WebSocket实时通知
     */
    void sendWebSocketNotification(NotificationDTO notificationDTO);
}